package top.zhangjianyong.tools.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.zhangjianyong.tools.service.api.DictionaryService;
import top.zhangjianyong.tools.utils.ApiResponse;

/**
 * @author ： zhangjianyong
 * @date ： 2022/5/12 10:22 AM
 */
@RestController
@RequestMapping("/dictionary")
public class DictionaryController {

    @Autowired
    private DictionaryService dictionaryService;

    @PostMapping("/list/{key}")
    public ApiResponse list(@PathVariable String key) {
        return dictionaryService.list(key);
    }
}
